home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 85 / CDMM85_1.ISO / Monopoly Tycoon / MTycoonDemo.exe / data1.cab / scripts / TUTORIAL1 / hub.lua next >
Encoding:
Text File  |  2001-10-24  |  4.8 KB  |  113 lines

  1. PromptHeading = ID_TUTORIAL_1_OFFSET + 1;
  2. g_currentprompt = 0;
  3. g_counter = 0;
  4. Tweaks.numyearsin24hours = 0;
  5.  
  6. -------------------------------------------------------------------------------------------------
  7. -- INITIALISE_Level. Standard level event
  8. -------------------------------------------------------------------------------------------------
  9. function EVENTINITIALISE_Level()
  10.     --Game.Pause();
  11.     -- load the building and business file
  12.     C_RunScript("scripts\\maps\\tempmap.lua");
  13.  
  14. end;
  15.  
  16. -------------------------------------------------------------------------------------------------
  17. -- Level. Standard level event.
  18. -------------------------------------------------------------------------------------------------
  19. function EVENT_Level()
  20.     -- create an initial prompt
  21.     C_TriggerEvent("BlockCam", 1, PACIFIC_AVENUE);
  22.     -- Game.Unpause();
  23.     Interface.DisableAllControls();
  24.     Interface.DisableAll3DPicking();
  25.     Interface.DisableCameraControl();
  26.     -- create the initial prompt
  27.     CreatePrompt(1);
  28. end;
  29.  
  30. function CATCHEVENT_InterfacePromptDismiss(a)
  31.     CreatePrompt(a);
  32. end;
  33.  
  34. function CATCHEVENT_TutorialEvent(a)
  35.  
  36.     if g_currentprompt == 12 then
  37.         Interface.DismissPrompt();
  38.         Interface.DisableControl(TUT_PCP_OPEN_CLOSE);
  39.     end;
  40.  
  41.     if g_currentprompt == 11 then
  42.         Interface.DismissPrompt();
  43.     end;
  44.  
  45.     if g_currentprompt == 10 then
  46.         g_counter = g_counter + 1;
  47.         if g_counter == 6 then
  48.             Interface.DismissPrompt();
  49.             Interface.DisableControl(TUT_PCP_TOGGLE_OPTIONS_LEFT);
  50.             Interface.DisableControl(TUT_PCP_TOGGLE_OPTIONS_RIGHT);
  51.         end;
  52.     end;
  53.  
  54.     if g_currentprompt == 5 then
  55.         Interface.DismissPrompt();
  56.         Interface.DisableControl(TUT_NAVIGATOR_PANEL);
  57.     end;
  58.  
  59. end;
  60.  
  61. -- prompt manager
  62. function CreatePrompt(a)
  63.     g_currentprompt = a;
  64.     body = a+PromptHeading;
  65.     if a == 1 then
  66.         Interface.CreatePrompt(PromptHeading, body, a+1); --"First, lets look at the panels around the screen", a+1);
  67.     elseif a == 2 then
  68.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Here's the clock - this tells you the time, and which year you are in. You can access the Options from here", a+1);
  69.         Interface.AddArrow(507, 18);
  70.     elseif a == 3 then
  71.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Next is your top line information. Which character you are using, your name and how much money you have.", a+1);
  72.         Interface.AddArrow(509, 79);
  73.     elseif a == 4 then
  74.         Interface.CreatePrompt(PromptHeading, body, a+1); --"And now the navigator. This map represents the whole city. The white arrow shows where you are. Clicking on the coloured squares will zoom you to the block it represents. Try it now.", a+1);
  75.         Interface.AddArrow(615,57);
  76.     elseif a == 5 then 
  77.         Interface.CreateMessage(PromptHeading, body, a+1); --"And now the navigator. This map represents the whole city. The white arrow shows where you are. Clicking on the coloured squares will zoom you to the block it represents. Try it now.", a+1);
  78.         Interface.AddArrow(547, 355);
  79.         Interface.EnableControl(TUT_NAVIGATOR_PANEL);
  80.     elseif a == 6 then
  81.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Good. The Navigator is a great way to get around the city.", a+1);
  82.     elseif a == 7 then
  83.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Now then. This panel is very important. Here you will find various details about the object you currently have selected.", a+1);
  84.         Interface.AddArrow(107, 103);
  85.     elseif a == 8 then
  86.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Because we have a city block selected, all of the information concerns the City Block.", a+1);
  87.         Interface.AddArrow(187, 66);
  88.     elseif a == 9 then
  89.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Finally, we have the Player Comparison Panel. Here you can see how well you are doing compared to the other players.", a+1);
  90.         Interface.AddArrow(190, 328);
  91.     elseif a == 10 then
  92.         Interface.CreateMessage(PromptHeading, body, a+1); -- "You can cycle through different information by clicking the arrow buttons. Have a go...", a+1);
  93.         Interface.AddArrow(180, 315);
  94.         g_counter = 0;
  95.         Interface.EnableControl(TUT_PCP_TOGGLE_OPTIONS_LEFT);
  96.         Interface.EnableControl(TUT_PCP_TOGGLE_OPTIONS_RIGHT);
  97.     elseif a == 11 then
  98.         Interface.CreateMessage(PromptHeading, body, a+1); --"Both of these panels can be packed away in case you want to get a better look at the city. To do this, click on the blue button.", a+1);
  99.         Interface.AddArrow(25, 315);
  100.         Interface.EnableControl(TUT_PCP_OPEN_CLOSE);
  101.     elseif a == 12 then
  102.         Interface.CreateMessage(PromptHeading, body, a+1); --"Great. Now click it again to reopen it.", a+1);
  103.         Interface.AddArrow(25, 315);
  104.     elseif a == 13 then
  105.         Interface.CreatePrompt(PromptHeading, body, a+1); --"Excellent, you now know what all of the panels do.", a+1);
  106.     else
  107.         Game.End(true);
  108. --        Interface.CreatePrompt(PromptHeading, "MESSAGE HERE", a+1);
  109.     end;
  110. end;
  111.  
  112.  
  113.